package com.example.actionsignin.mvp.view;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.example.actionsignin.R;

/**
 * 查看图片
 */
public class LookPhotoActivity extends AppCompatActivity implements View.OnClickListener{

    private ImageView imageView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_look_photo);

        String path = getIntent().getStringExtra("path");

        imageView = (ImageView) findViewById(R.id.image_look_photo);
        imageView.setOnClickListener(this);

        Glide.with(this).load(path).into(imageView);
    }

    @Override
    public void onClick(View v) {
        int id = v.getId();
        switch (id)
        {
            case R.id.image_look_photo:
                LookPhotoActivity.this.finish();
                break;
        }
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
}
